package com.wf.course.service.impl;


import java.util.ArrayList;
import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.utils.page.PageBean;
import com.wf.course.dao.IGoodsOrderMapper;
import com.wf.course.dao.IMemberRechargeOrderMapper;
import com.wf.course.model.goods.GoodsOrder;
import com.wf.course.model.member.IncomeStatistics;
import com.wf.course.model.member.MemberRechargeOrder;
import com.wf.course.service.IMemberRechargeOrderService;

@Service
@Transactional
public class IMemberRechargeOrderServiceImpl implements IMemberRechargeOrderService {
	
	@Autowired
	private IMemberRechargeOrderMapper mapper;
	@Autowired
	private IGoodsOrderMapper goodsOrderMapper;
	@Override
	public void queryList(PageBean<MemberRechargeOrder> pageBean) {
		// TODO Auto-generated method stub
		pageBean.setResults(mapper.queryList(pageBean));
		pageBean.setTotalCount(mapper.getTotalCount(pageBean));
	}
	/**
	 * 铜钱充值列表
	 */
	@Override
	public void coinRechargeList(PageBean<MemberRechargeOrder> pageBean) {
		// TODO Auto-generated method stub
		pageBean.setResults(mapper.coinRechargeList(pageBean));
		pageBean.setTotalCount(mapper.getCoinRechargeCount(pageBean));
	}
	@Override
	public List<MemberRechargeOrder> queryCoinRechargeList(PageBean<MemberRechargeOrder> pageBean) {
		// TODO Auto-generated method stub
		return mapper.queryCoinRechargeList(pageBean);
	}
	/**
	 * 根据ID获取一条充值铜钱信息
	 * @param id
	 * @return
	 */
	@Override
	public MemberRechargeOrder query(String order_no) {
		// TODO Auto-generated method stub
		return mapper.query(order_no);
	}
	@Override
	public void incomeStatisticsList(PageBean<IncomeStatistics> pageBean) {
		// TODO Auto-generated method stub
		pageBean.setResults(mapper.incomeStatisticsList(pageBean));
		pageBean.setTotalCount(mapper.incomeStatisticsCount(pageBean));
	}
	/**
	 * 导出充值记录查询
	 */
	@Override
	public List<MemberRechargeOrder> queryRechargeRecordList(PageBean<MemberRechargeOrder> pageBean) {
		// TODO Auto-generated method stub
		return mapper.queryRechargeRecordList(pageBean);
	}
	/**
	 * 导出总订单统计信息
	 */
	@Override
	public List<IncomeStatistics> queryAllOrderList(PageBean<IncomeStatistics> pageBean) {
		// TODO Auto-generated method stub
		return mapper.queryAllOrderList(pageBean);
	}
}
